import { debounceTime, delay, of, switchMap } from "rxjs";

const source = of(1, 2, 3);

const sub = source
  .pipe(
    // delay(1000),
    debounceTime(1000),
    switchMap((n) => {
      console.log("inside switchMap");
      return of(n * 3);
    }),
  )
  .subscribe(console.log);

console.log(sub.closed)
